import 'package:elephant_fish/model/rank_year_entity.dart';
import 'package:elephant_fish/util/size_util.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';

class CharmYearRankList extends StatefulWidget {
  final Arr anchor;
  const CharmYearRankList({Key key, this.anchor}) : super(key: key);

  @override
  _CharmYearRankListState createState() => _CharmYearRankListState();
}

class _CharmYearRankListState extends State<CharmYearRankList> {


  @override
  Widget build(BuildContext context) {
    return Stack(
      children: [
        Align(
          alignment: Alignment.topLeft,
          child: Padding(padding: EdgeInsets.only(left: SizeUtil.px(35),top: SizeUtil.px(45)),
              child:  Text(
                widget.anchor.level.toString(),
                style: TextStyle(
                    fontSize: SizeUtil.px(28),color: Color(0xffff5784)
                ),
              )
          ),
        ),
        Align(
          alignment: Alignment.topLeft,
          child: Padding(padding: EdgeInsets.only(left: SizeUtil.px(87),top: SizeUtil.px(24)),
            child:  CircleAvatar(
              radius: SizeUtil.px(35),
              backgroundImage: NetworkImage('http://119.28.131.94:82' + widget.anchor.avatar),
              child: Container(
                width: SizeUtil.px(70),
                height: SizeUtil.px(70),
              ),
            ),
          ),
        ),
        Align(
          alignment: Alignment.topLeft,
          child:  Padding(padding: EdgeInsets.only(left: SizeUtil.px(173)),
              child:Stack(
                children: [
                  Align(
                    alignment: Alignment.topLeft,
                    child: Padding(padding: EdgeInsets.only(top: SizeUtil.px(26)),
                      child:   Text(
                        widget.anchor.nickname,
                        style: TextStyle(fontSize: SizeUtil.px(30),color: Color(0xfff3f3f3)),
                      ),
                    ),
                  ),
                  Align(
                    alignment: Alignment.topLeft,
                    child:   Padding(padding: EdgeInsets.only(top: SizeUtil.px(70) ),
                      child:  Text(
                        'ID:' + widget.anchor.idNumber.toString(),
                        style: TextStyle(fontSize: SizeUtil.px(30),color: Color(0xfffe4b53)),
                      ),
                    ),
                  ),
                ],
              )
          ),
        ),
      ],
    );
  }
}
